<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSettingHomeImages extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if(!Schema::hasTable("setting_home_images")){
            Schema::create('setting_home_images', function (Blueprint $table) {
                $table->increments('id');
                $table->string("img_name",225)->default("")->comment("轮播图的背景图名称");
                $table->string('img_url',127)->default("")->comment("首页轮播图的图片地址");
                $table->string("url_set")->default("")->comment("图片的点击效果,链接");
                $table->unsignedTinyInteger("is_show")->default(1)->comment("当前轮播图图片是否显示(0:不显示 1 显示)");
                $table->timestamps();
                $table->charset = "utf8";
                $table->collation = 'utf8_general_ci';
                $table->comment = "首页轮播图的图片信息";
            });
        }

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('setting_home_images');
    }
}
